import { GET_THEME } from '@/utils/theme'
import { defineStore } from 'pinia'
import { ref } from 'vue'

// 用于存储主题色的仓库
const useThemeStore = defineStore(
  'theme',
  () => {
    // 控制主题的的属性
    let dark = ref(GET_THEME() || false)
    return { dark }
  },
  {
    persist: true,
  },
)
export default useThemeStore
